package juc.c_001;/*
   Talk is cheap. Show me the code.
 */

/**
 * @Description
 * @Date 2021/6/6
 * @Author liudl
 */
public class T4 {
    private static int count = 10;

    public static synchronized void m() {//等同于synchronized(T.class)
        count--;
        System.out.println(Thread.currentThread().getName() + "count = " + count);
    }

    public static void mm() {
        synchronized (T4.class) {//静态方法没有this对象的引用
            count--;
        }
    }

}
